package com.dr.java.day03;

/**
 * Created by rui on 2017/12/29.
 */
/*
* 函数重载：
* 函数名相同，参数不同（个数或者类型）。与返回的类型没有关系
*
* */
public class OverLoad {
    public static void main(String[] args) {
        System.out.println(getSum(2, 3));
        System.out.println(getSum(2, 3, 4));
    }

    private static int getSum(int i, int j, int n) {
        return i + j + n;
    }

    private static int getSum(int i, int j) {

        return i + j;
    }
}
